#ifndef OPENGLTEXTURECUBE_H
#define OPENGLTEXTURECUBE_H

#include "Renderer/texture.h"
#include "Renderer/font.h"

// #include <glad/glad.h>

namespace CC {

	class OpenGLTextureCube : public TextureCube
	{
	public:

        OpenGLTextureCube(const std::string& path);
		virtual ~OpenGLTextureCube();

        virtual void Generate(unsigned int index, unsigned char* data, int width, int height, int channels, TextureType type = TextureType_ClampToEdge);

		virtual uint32_t GetWidth() const override { return m_Width;  }
		virtual uint32_t GetHeight() const override { return m_Height; }
		virtual uint32_t GetRendererID() const override { return m_RendererID; }

		virtual const std::string& GetPath() const override { return m_Path; }
		
		virtual void SetData(void* data, uint32_t size) override;

		virtual void SetData(unsigned char* data, int width, int height, int channels, TextureType type = TextureType_ClampToEdge) override;

		virtual void Bind(uint32_t slot = 0) const override;
		virtual void UnBind() const override;

		virtual bool IsLoaded() const override { return m_IsLoaded; }

		virtual bool operator==(const Texture& other) const override
		{
			return m_RendererID == other.GetRendererID();
		}

		virtual void SetID(uint32_t id) override;
		virtual uint32_t GetID() override {
			return m_RendererID;
		};

		virtual std::string GetPath(){
			return m_Path;
		}

	private:
		std::string m_Path;
		bool m_IsLoaded = false;
		uint32_t m_Width, m_Height;
		uint32_t m_RendererID;
		GLenum m_InternalFormat, m_DataFormat;
	};

}

#endif